function [ ] = WriteEstimatesTable( Params , PARAMSTITLE )


fid = fopen(['results/' PARAMSTITLE '.tex'],'w');

fprintf(fid,'\\begin{tabular}{llll}\n');
fprintf(fid,'Parameter & Interpretation & Target & Estimate \\\\[1mm] \n');
fprintf(fid,'\\hline \\\\ \n');


fprintf(fid,'$\\rho$    & Discount rate                & Annual interest rate        & %2.3f \\\\ \n' , Params.rho - Params.Delta - Params.mu - Params.phiLearning ) ;
fprintf(fid,'$\\Delta$  & Labor force exit rate        & Aggregate unemployment rate & %2.3f \\\\ \n' , Params.Delta ) ;
fprintf(fid,'$\\omega$  & Housing share (workers)      & Expenditures on housing     & %2.2f \\\\ \n' , Params.omega ) ;
fprintf(fid,'$\\psi$    & Housing share (firms)        & Expenditures on housing     & %2.2f \\\\ \n' , Params.psi ) ;
fprintf(fid,'$\\delta$  & Drift of productivity        & Job losing rate by tenure & %2.3f \\\\ \n'   , Params.delta ) ;
fprintf(fid,'$\\sigma$  & Volatility of productivity   & Wage growth by tenure       & %2.3f \\\\ \n' , Params.sigma ) ;
fprintf(fid,'$\\beta$   & Bargaining power             & Labor share                 & %2.2f \\\\ \n' , Params.beta ) ;
fprintf(fid,'$Y$        & Lower bound of init. prod.   & Job acceptance probability  & %2.2f \\\\ \n' , Params.zhat0 ) ;
fprintf(fid,'$\\eta$    & Housing elasticity           & Housing prices & %2.2f \\\\ \n' , Params.eta ) ;
fprintf(fid,'$\\mu$     & Migration rate               & Migration rate & %2.3f \\\\ \n' , Params.mu ) ;
fprintf(fid,'$1/\\varepsilon$ & Migration elasticity     & Migration shares            & %2.2f \\\\ \n' , Params.nu ) ;
fprintf(fid,'$\\alpha$  & Matching function elasticity & Local job finding rates     & %2.2f \\\\ \n' , Params.alpha ) ;
fprintf(fid,'$\\gamma$  & Vacancy cost elasticity      & Local job finding rates     & %2.2f \\\\ \n' , Params.gamma ) ;
fprintf(fid,'$\\varphi$ & Learning rate                & Unemployment scar     & %2.2f \\\\[2mm] \n' , Params.phiLearning ) ;

fprintf(fid,'\\hline \\\\ \n');

fprintf(fid,'$\\underline{z}$     & Lowest job quality & Local job losing rates      & %2.2f \\\\ \n' , 1 / Params.zetaU ) ;
fprintf(fid,'$\\overline{z}$     & Highest job quality  & Local job losing rates      & %2.2f \\\\ \n' , 1 / Params.zetaL ) ;
fprintf(fid,'$g_1$     & Shape of job quality distrib.& Local job losing rates      & %2.2f \\\\ \n' , Params.p1zeta ) ;
fprintf(fid,'$g_2$     & Shape of job quality distrib.& Local job losing rates      & %2.2f \\\\ \n' , Params.p2zeta ) ;
fprintf(fid,'$\\s_\\ell$ & St.d. of local productivity & Local wages                 & %2.2f \\\\ \n' , Params.stdlL ) ;
fprintf(fid,'$\\s_a$    & St.d. of local amenities     & Local population            & %2.2f \\\\ \n' , Params.stdlA ) ;
fprintf(fid,'$c_{\\ell,a}$ & Correlation prod.--amenities  & Local wages and population  & %2.2f \\\\[2mm] \n' , Params.corrlLlA ) ;
fprintf(fid,'\\hline\n');
fprintf(fid,'\\end{tabular}');

fclose(fid);








% Table with estimators

fid = fopen(['results/' PARAMSTITLE 'Estimators.tex'],'w');

fprintf(fid,'\\begin{tabular}{lllll}\n');
fprintf(fid,'Parameter & Interpretation & Target & Estimator & Estimate \\\\[1mm] \n');
fprintf(fid,'\\hline \\\\ \n');


fprintf(fid,'$\\rho$    & Discount rate                & Annual interest rate        & MDE  & %2.3f \\\\ \n' , Params.rho - Params.Delta - Params.mu - Params.phiLearning ) ;
fprintf(fid,'$\\Delta$  & Labor force exit rate        & Aggregate unemployment rate & MDE  & %2.3f \\\\ \n' , Params.Delta ) ;
fprintf(fid,'$\\omega$  & Housing share (workers)      & Expenditures on housing     & MDE  & %2.2f \\\\ \n' , Params.omega ) ;
fprintf(fid,'$\\psi$    & Housing share (firms)        & Expenditures on housing     & MDE  & %2.2f \\\\ \n' , Params.psi ) ;
fprintf(fid,'$\\delta$  & Drift of productivity        & Job losing rate by tenure   & NLLS & %2.3f \\\\ \n'   , Params.delta ) ;
fprintf(fid,'$\\sigma$  & Volatility of productivity   & Wage growth by tenure       & NLLS & %2.3f \\\\ \n' , Params.sigma ) ;
fprintf(fid,'$\\beta$   & Bargaining power             & Labor share                 & MDE  & %2.2f \\\\ \n' , Params.beta ) ;
fprintf(fid,'$Y$        & Lower bound of init. prod.   & Job acceptance probability  & MDE  & %2.2f \\\\ \n' , Params.zhat0 ) ;
fprintf(fid,'$\\eta$    & Housing elasticity           & Housing prices              & OLS  & %2.2f \\\\ \n' , Params.eta ) ;
fprintf(fid,'$\\mu$     & Migration rate               & Migration rate              & MDE  & %2.3f \\\\ \n' , Params.mu ) ;
fprintf(fid,'$1/\\varepsilon$ & Migration elasticity     & Migration shares          & 2SLS & %2.2f \\\\ \n' , Params.nu ) ;
fprintf(fid,'$\\alpha$  & Matching function elasticity & Local job finding rates     & 2SLS & %2.2f \\\\ \n' , Params.alpha ) ;
fprintf(fid,'$\\gamma$  & Vacancy cost elasticity      & Local job finding rates     & 2SLS & %2.2f \\\\ \n' , Params.gamma ) ;
fprintf(fid,'$\\varphi$ & Learning rate                & Unemployment scar           & OLS  & %2.2f \\\\[2mm] \n' , Params.phiLearning ) ;

fprintf(fid,'\\hline \\\\ \n');

fprintf(fid,'$\\underline{z}$     & Lowest job quality & Local job losing rates      & MDE  & %2.2f \\\\ \n' , 1 / Params.zetaU ) ;
fprintf(fid,'$\\overline{z}$     & Highest job quality  & Local job losing rates     & MDE  & %2.2f \\\\ \n' , 1 / Params.zetaL ) ;
fprintf(fid,'$g_1$     & Shape of job quality distrib.& Local job losing rates       & MDE  & %2.2f \\\\ \n' , Params.p1zeta ) ;
fprintf(fid,'$g_2$     & Shape of job quality distrib.& Local job losing rates       & MDE  & %2.2f \\\\ \n' , Params.p2zeta ) ;
fprintf(fid,'$\\s_\\ell$ & St.d. of local productivity & Local wages                 & MDE  & %2.2f \\\\ \n' , Params.stdlL ) ;
fprintf(fid,'$\\s_a$    & St.d. of local amenities     & Local population            & MDE  & %2.2f \\\\ \n' , Params.stdlA ) ;
fprintf(fid,'$c_{\\ell,a}$ & Correlation prod.--amenities  & Local wages and population  & MDE  & %2.2f \\\\[2mm] \n' , Params.corrlLlA ) ;
fprintf(fid,'\\hline\n');
fprintf(fid,'\\end{tabular}');

fclose(fid);


end

